package jwdt.xadmin.system.bean;

import java.util.List;

import jwdt.common.util.CacheUtil;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Table;
import com.ezerg.fastjson.annotation.JSONField;

@Table(name="jwdt_qx_js", keys={"jsdm"})
@SuppressWarnings("rawtypes")
public class QXJS implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private String jsdm = "";
	
	private String jsmc = "";
	
	private Integer zt;
	
	//扩展属性
	@JSONField(serialize=false)
	public List getJscd() {
		return Jdb.get().query(QXCD.class, "cddm IN (SELECT cddm FROM jwdt_qx_jscd WHERE jsdm='" + jsdm + "')", CacheUtil.C0);
	}
	
	@JSONField(serialize=false)
	public String getJscdmx(String cddm) {
		QXCD cd = (QXCD)Jdb.get().get(QXCD.class, cddm);
		String sql = "select mxdm from jwdt_qx_jscdmx where cddm='" + cd.getCddm() 
		           + "' and jsdm='" + jsdm + "' and fldm='" + cd.getMxqx() + "'";
		return Jdb.get().queryForString(sql);
	}
	
	public String getJsdm() {
		return jsdm;
	}

	public void setJsdm(String jsdm) {
		this.jsdm = jsdm;
	}

	public String getJsmc() {
		return jsmc;
	}

	public void setJsmc(String jsmc) {
		this.jsmc = jsmc;
	}

	public Integer getZt() {
		return zt;
	}

	public void setZt(Integer zt) {
		this.zt = zt;
	}

	
}
